<template>
  <div class="xuanxiang">
    <div class="once">
      <div class="left">
        <span class="iconfont icon-navicon-jsgl"></span>
        <span class="one">我的角色</span>
      </div>
      <div class="right">&gt;</div>
    </div>
    <div class="once">
      <div class="left">
        <span class="iconfont icon-youxiguanli"></span>
        <span class="one">游戏中心</span>
      </div>
      <div class="right">&gt;</div>
    </div>
    <div class="once">
      <div class="left">
        <span class="iconfont icon-shoucangjia"></span>
        <span class="one">收藏</span>
      </div>
      <div class="right">&gt;</div>
    </div>
    <div class="once">
      <div class="left">
        <span class="iconfont icon-lishishuju"></span>
        <span class="one">浏览历史</span>
      </div>
      <div class="right">&gt;</div>
    </div>
    <div class="once">
      <div class="left">
        <span class="iconfont icon-shezhi"></span>
        <span class="one">设置</span>
      </div>
      <div class="right">&gt;</div>
    </div>
    <div class="once" v-if="arr.length != 0" @click="exit()">
      <div class="left">
        <span class="iconfont icon-shezhi"></span>
        <span class="one">退出登录</span>
      </div>
      <div class="right">&gt;</div>
    </div>
  </div>
</template>

<script>
export default {
  props:["arr"],
  data(){
    return{
      exited:''
    }
  },
  methods: {
    exit(){
        this.$emit("exit",this.exited);
        window.localStorage.removeItem('token');
      }
  },
}
</script>

<style scoped>
  .xuanxiang{
    min-height: .5rem;
  }
  .xuanxiang .once{
    height: .5rem;
    /* background-color: turquoise; */
    border-bottom: 1px solid rgb(235,235,235);
    display: flex;
    line-height: .5rem;
    justify-content: space-between;
  }
  .xuanxiang .once .iconfont{
    font-size: .2rem;
    margin-right: .1rem;
    vertical-align: middle;
  }
  .xuanxiang .once .one{
    vertical-align: middle;
    font-weight: 500;
  }
  .xuanxiang .once .right{
    font-size: .2rem;
    font-weight: 500;
    color: rgb(155,155,155);
  }
</style>